package org.x.casemodule.enums;

public enum ResponseStatusEnum {

    //'ACCEPTED','DECLINED','TENTATIVE'
    ACCEPTED("ACCEPTED", "接受"),
    DECLINED("DECLINED", "拒绝"),
    TENTATIVE("TENTATIVE", " 暂定");
    private String code;
    private String name;
    ResponseStatusEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }
    public String getCode() {
        return code;
    }
    public String getName() {
        return name;
    }
    public static ResponseStatusEnum getByCode(String code) {
        for (ResponseStatusEnum value : ResponseStatusEnum.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
    public static ResponseStatusEnum getByName(String name) {
        for (ResponseStatusEnum value : ResponseStatusEnum.values()) {
            if (value.getName().equals(name)) {
                return value;
            }
        }
        return null;
    }



}
